﻿<%@ Page Language="VB" %>

<%@ Import Namespace="System.Collections.Generic" %>
<%@ Import Namespace='Microsoft.Reporting.WebForms' %>
<%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
    Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

        Try
            Dim parameters = New List(Of ReportParameter)()
        
            'Dim pExpire = New ReportParameter("str_group_user_password_expire", Request.QueryString("str_group_user_password_expire"))
            'pExpire.Name = "str_group_user_password_expire"
            'parameters.Add(pExpire)
        
            'Dim pCode = New ReportParameter("str_department_code", Request.QueryString("str_department_code"))
            'pCode.Name = "str_department_code"
            'parameters.Add(pCode)
        
            Dim pCat = New ReportParameter("str_group_user_type", Request.QueryString("str_group_user_type"))
            pCat.Name = "str_group_user_type"
            parameters.Add(pCat)
        
            'Dim pStatus = New ReportParameter("str_group_user_status", Request.QueryString("str_group_user_status"))
            'pStatus.Name = "str_group_user_status"
            'parameters.Add(pStatus)
        
            ReportViewer1.LocalReport.SetParameters(parameters)
        Catch ex As Exception
            GenericHelper.ShowAlert(Me, ex)
        End Try

    End Sub
    
</script>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <rsweb:ReportViewer ID="ReportViewer1" runat="server" Font-Names="Verdana" Font-Size="8pt"
            Height="500px" Width="100%">
            <LocalReport ReportPath="Reports\report_group_user.rdlc">
                <DataSources>
                    <rsweb:ReportDataSource DataSourceId="ObjectDataSource1" Name="report_group_user_USP_List_group_user1" />
                </DataSources>
            </LocalReport>
        </rsweb:ReportViewer>
        <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" OldValuesParameterFormatString="original_{0}"
            SelectMethod="GetData" 
            TypeName="report_group_userTableAdapters.USP_List_group_user1TableAdapter">
            <SelectParameters>
                <asp:QueryStringParameter DefaultValue="0" Name="group_user_type" QueryStringField="group_user_type"
                    Type="Int32" />
                <asp:SessionParameter Name="ctx_group_user_type" SessionField="group_user_type" 
                    Type="Int32" DefaultValue="" />
                <asp:SessionParameter Name="ctx_department_code" SessionField="department_code" 
                    Type="Int32" DefaultValue="" />
                <asp:QueryStringParameter DefaultValue="0" Name="department_code" QueryStringField="department_code"
                    Type="String" />
            </SelectParameters>
        </asp:ObjectDataSource>
    </div>
    </form>
</body>
</html>
